import request from '../utils/request.js'

// 单次诊断
export const singleDiagnosis = (data) => {
	return request({
		url: '/model/getProbList',
		method: 'post',
		data: data
	})
}

// 图像亮度增强
export const enhanceImage = (data) => {
	return request({
		url: '/model/enhanceImage',
		method: 'post',
		data: data
	})
}

// 批量预测
export const batchDignosis = (data) => {
	return request({
		url: "/model/uniappGetBatchProbList",
		method: "post",
		data: data
	})
}

// 获取用户的诊断历史
export const getHistory = () => {
	return request({
		url: '/info/getDiagnosisHistory',
		method: 'get'
	})
}

// 获取前k个指定疾病的患者信息
export const getTopKInfo = (diseaseType, k) => {
	return request({
		url: `/info/getTopKCase?type=${diseaseType}&k=${k}`,
		method: 'get'
	})
}

// 患者自愿上传信息
export const submitInfo = (data) => {
	return request({
		url: '/info/submitInfo',
		method: 'post',
		data: data
	})
}